package reflect;

import reflect.annotations.AutoRunClass;

/**
 * @author liyang
 * @version 1.0
 * @package reflect
 * @file ReflectDemo8.java
 * @description
 * @time 2024/6/27 下午5:33
 */
public class ReflectDemo8 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class cls = Class.forName("reflect.Person");
//        用于判断是否被标注 ||annotation:加注，注释
        boolean is = cls.isAnnotationPresent(AutoRunClass.class);
        if (is){
            System.out.println("被标注了");
        }else{
            System.out.println("没被标注！");
        }
    }
}
